import request from '@/utils/request'

//首页数据
export function getIndex(data: any) {
    return request.get({ url: '/index/index', data })
}

// 装修页面
export function getDecorate(data: any) {
    return request.get({ url: '/decorate', data })
}

// 热门搜索
export function getHotSearch() {
    return request.get({ url: '/hotSearch' })
}

/**
 * @description 搜索
 * @param { string } keyword 关键词
 * @return { Promise }
 */
export function getSearch(data: { keyword: string; pageNo: number; pageSize: number }) {
    return request.get({ url: '/search', data })
}

	
// 获取师傅订单-预约中订单
export function getstafflist(data: any) {
    return request.get({ url: '/order/staff/list',data })
}
// 首页图片
export function getgetIndexImage(data: any) {
    return request.get({ url: '/getIndexImage?type=' + data })
}
// 服务列表
export function getgoogs(data: any) {
    return request.get({ url: '/goods/list',data })
}
// 获取今日推荐
export function getToday() {
    return request.get({ url: '/getTodaySpecials' })
}



export function getcouponCodeInfo(data: any) {
    return request.get({ url: `/coupon/getCouponByCouponCode`,data })
}

export function postcouponcode(code: any) {
    return request.post({ url: `/coupon/collect/code/${code}` })
}
